	

-- D:\GOA\reslibrary\templete\res\area\area.phone.lua.xsl 14
					
gr_module("gm_xinbanchunzhongyun")

mainclientareaArea = inherit(GmCtrl.ControlBase):name("mainclientareaArea")

mainclientareaArea.init = function (self,parent,aid)

	local top = self
	local fid = aid or "mainclientareaArea"
	GmCtrl.ControlBase.init(self,parent,fid )

	
	self.panel_pop = self:get_child("panel_pop")
	
	self.btcadd = self:get_child("btcadd")
	self.btcadd:set_click(function(link)
		top.hostWindow:addNavFrame('cgfcustomeradd',nil,function(frame)
		end)			
	end)
	
	
	self.btcsort = self:get_child("btcsort")
	self.btcsort:set_click(function(link)
		top.panel_pop:set_visible(true)
	end)
		
	
	--[[
	
	self.customerindex = self:get_child("customerindex")
	self.customerindex:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customermanage = self:get_child("customermanage")
	self.customermanage:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerzone',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerdelivery = self:get_child("customerdelivery")
	self.customerdelivery:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerservice',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customersale = self:get_child("customersale")
	self.customersale:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersale',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerzone = self:get_child("customerzone")
	self.customerzone:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerzone',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerservice = self:get_child("customerservice")
	self.customerservice:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerservice',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customersaleman = self:get_child("customersaleman")
	self.customersaleman:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customersaleman',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerbrand = self:get_child("customerbrand")
	self.customerbrand:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerbrand',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customercategory = self:get_child("customercategory")
	self.customercategory:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customercategory',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customerregion = self:get_child("customerregion")
	self.customerregion:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customerregion',nil,function(frame)
				
		end)
					  			
	end)
	
	self.customernewest = self:get_child("customernewest")
	self.customernewest:set_click(function(link)			
			
		top.hostWindow:addNavFrame('customernewest',nil,function(frame)
				
		end)
					  			
	end)
	
	]]
	
	
	-- D:\GOA\reslibrary\templete\res\area\_include.lua.xsl 47 cgfcustomerlistarea
	self.cgfcustomerlistarea = gm_xinbanchunzhongyun.cgfcustomerlistareaArea(self)	
		
	--self.cgfcustomerlistarea:init_net_data()	
	
	

	self.page = 0
	
	self:show_scroll_bar(true)

end


mainclientareaArea.on_show = function(self,key)

	if self.cgfcustomerlistarea and self.cgfcustomerlistarea.on_show then
		self.cgfcustomerlistarea:on_show(key)
	end
	
	
end







mainclientareaArea.set_ref_data = function(self,data)
	table.print(data)
	for a,b in pairs(data) do
		if self[a] then
			self[a]:set_text(b)
		end
	end
end


mainclientareaArea.set_data = function(self,data)
	self.data = data
	
	for a,b in pairs(data) do
		if self[a] ~= nil and type(self[a]) == 'table' and self[a].set_text ~= nil then
			self[a]:set_text(tostring(b))
		end
	end
	
end



mainclientareaArea.set_title = function(self,value)
	self.title = value
end
		